package com.caiyouxi.partner.controller;

import com.caiyouxi.common.bean.ResData;
import com.caiyouxi.partner.model.PartnerContactsBean;
import com.caiyouxi.partner.service.PartnerContactsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("partner_contacts")
public class PartnerContactsController {
    @Autowired
    private PartnerContactsService service;
    //删除
    @RequestMapping("delete_contacts")
    public ResData delete_contacts(@RequestBody PartnerContactsBean bean){
        return service.delete_contacts(bean);
    }
    //添加
    @RequestMapping("insert_contacts")
    public ResData insert_contacts(@RequestBody PartnerContactsBean bean){
        return service.insert_contacts(bean);
    }
    //查询单条记录
    @RequestMapping("select_contacts")
    public ResData select_contacts(@RequestBody PartnerContactsBean bean){
        return service.select_contacts(bean);
    }
    //更新
    @RequestMapping("update_contacts")
    public ResData update_contacts(@RequestBody PartnerContactsBean bean){
        return service.update_contacts(bean);
    }
    //分页查询
    @RequestMapping("select_contacts_list")
    public ResData select_contacts_list(@RequestBody PartnerContactsBean bean){
        return service.select_contacts_list(bean);
    }
}
